package com.mate.cloud.auth.domain;

import lombok.Data;

import java.io.Serial;
import java.util.List;

/**
 * SpringSecurity需要的用户详情
 *
 * @author: MI
 * @email: 448341911@qq.com
 * @createTime: 2024/6/14 22:33
 * @updateUser: MI
 * @updateTime: 2024/6/14 22:33
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Data
public class MateUserDetails {

    @Serial
    private static final long serialVersionUID = -7280690379580495399L;

    private final Integer id;

    private final UmsAdmin umsAdmin;


    private final List<UmsResource> resourceList;

    public MateUserDetails(Integer id, UmsAdmin umsAdmin, List<UmsResource> resourceList) {
        this.id = id;
        this.umsAdmin = umsAdmin;
        this.resourceList = resourceList;
    }


    public Integer getId() {
        return umsAdmin.getId();
    }
}
